package org2.jogo;

import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface.OnClickListener;
import android.widget.Toast;

public class Utils {

	public static AlertDialog exibirListaDeSelecao(Context ctx, String title, CharSequence[] items, OnClickListener clickAction) {
		AlertDialog.Builder builder = new AlertDialog.Builder(ctx);
		builder.setTitle(title);
		builder.setItems(items, clickAction);
		AlertDialog alert = builder.create();
		alert.show();
		return alert;
	}
	
	public static void showToast(Context ctx, String msg) {
		Toast.makeText(ctx, msg, Toast.LENGTH_SHORT).show();
	}
	
	public static void showLongToast(Context ctx, String msg) {
		Toast.makeText(ctx, msg, Toast.LENGTH_LONG).show();
	}
}
